Container: Fix scrolled coord in set_focus_child()
authorDaniel Boles <dboles@src.gnome.org>
Mon, 7 Aug 2017 17:25:28 +0000 (18:25 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 7 Aug 2017 17:42:15 +0000 (18:42 +0100)
commitc4865bed432073ff8ed0551e16169c57f5633b32
tree9b85f5eafa581ea1ec98670a36cc969ef39fa2db
parente29f39b66cfeb82d4a5f7ce0ff1eee94c57916a2
Container: Fix scrolled coord in set_focus_child()

Commit 885bcd9fe4b6b4ecb003570ea0520cf42ec737a9 trampled the bit here
that is meant to translate between the nominated focus child and the
actual innermost one that is used for updating the h/v adjustments.

So, we need to save the passed focus child before diving into its
children, then translate and get allocations between them both. This
makes GTK+ 4 behave like GTK+ 3 again: instead of priv->focus_child and
focus_child, we now have focus_child and child, serving the roles of the
nominated focus child and its innermost focus child respectively.

This also ditches the unnecessary call to Widget:get_focus_child(), as
Container::set_focus_child() gets that same new child as an argument.
gtk/gtkcontainer.c